class Solution {
    public boolean increasingTriplet(int[] nums) {
        int n=nums.length;
        int first=nums[0];
        int scoend=Integer.MAX_VALUE;
        for(int i=1;i<n;i++)
        {
            if(nums[i]>scoend)
            return true;
            else if(nums[i]>first)
            scoend=nums[i];
            else
            first=nums[i];
        }
        return false;
    }
}
